<template>
 <div class="page">
          <el-pagination background @current-change='current' @prev-click='prev' @next-click='next' :page-size='page'
            layout="prev, pager, next" :total="count">
          </el-pagination>
        </div>
</template>

<script>
  export default{
    props:['count'],
    data(){
      return{
        page: 8
      }
    },
    methods:{
      current(val) {
        this.$parent.getlist(val, this.page);
      },
      prev(val) {
        this.$parent.getlist(val, this.page);
      },
      next(val) {
        this.$parent.getlist(val, this.page);
      }
    }
  }
</script>

<style scoped>
 .page {
    text-align: center;
    margin: 30px auto;
  }
</style>
